<?phpclass Publishers_model extends MY_Model{	var $publishername;	function __construct($id=''){		parent::__construct();		$GLOBALS['table'] = 'publishers';		if($id){			$query = $this->db->get_where('publishers',array('id' => $id),1);			$result = $query->result();			if(!empty($result)){				$this->id = $result[0]->id;				$this->publishername = $result[0]->publishername;			}		}	}		function get_all_rows(){		return $this->db->count_all_results('publishers');	}		function get_consumable_by_page($limit,$offset){		$this->db->order_by('publishername','asc');		$query = $this->db->get('publishers',$limit,$offset);		return $query->result_array();	}}